1. Field of the Invention
The present invention relates to a drawing device, a method for drawing, and a computer readable recording medium for displaying a vector image.
2. Description of the Related Art
Image data displayed on a display device includes raster data that stores information for each of a plurality of pixels arranged in two dimensions and vector data that stores line information.
Raster data includes color and luminance data for each pixel. Vector data includes, for example, data such as a start point and an end point of a line segment, a combination of orders of functions and points for defining a curve, and data for specifying an arc.
Generally, images made from raster data are called raster images, and images made from vector data are called vector images.
In the case where a raster image is enlarged and displayed, each pixel unit is enlarged and displayed without a calculation, and therefore the roughness of the image is highly visible. On the other hand, in the case where a vector image is enlarged and displayed, a calculation is performed according to the resolution, and therefore a smooth image is displayed. For example, an outline font is an example of a group of typeface characters (also known as a font) that stores vector data and produces a smooth display when enlarged or reduced.
A raster image simply stores the color and luminance data of all of the pixels, and therefore fill regions of figures also are displayed as is. On the other hand, for vector images, a closed figure represented by vector data specifies a region to be filled. To display the fill region, the pixels included in the region are determined, and the pixels of the region are given a specified color and luminance. In the case where figures overlap, intersections and overlapping regions are calculated from the vector data, and pixels to be filled are defined.
For example, Japanese Published Unexamined Patent Application No. 2003-099027 discusses technology for displaying a fill region even in the case when a portion or an entirety of a boundary of the fill region is outside of the display area. The technology discussed in this Patent Reference includes: a fill line drawer for calculating coordinates of drawing points forming a boundary, writing image data to image memory corresponding to the coordinates in the case where the coordinates are inside the display area, and writing image data to image memory corresponding to the left edge of the display area at the same y coordinates when x coordinates of the calculated drawing points are beyond the left side of the display area; and a fill processor for storing display data in a display memory based on the image data written to image memory.